﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    public enum Qun
    {
        剪刀 = 1,
        石头,
        布
    }
    abstract class Jse
    {
        public Jse(string name)
        {
            this.name = name;
        }
        public int grade { get; set; }//分数
        public int FGG { get; set; }//猜拳
        public Jse()
        {
        
        }

        public string name { get; set; }

        public abstract void Cun();

    }
    class Figure : Jse
    {
        public Figure(string name) : base(name)
        {
            
        }
        public override void Cun()
        {
            Console.WriteLine("请出拳：1.剪刀 2.石头 3.布");
            this.FGG = int.Parse(Console.ReadLine());
            Qun qun = (Qun)FGG;
            Console.WriteLine("{0}:出拳：{1}", this.name, qun);
        }
    }
    class Npc : Jse 
    {
        public Npc(string name) : base(name)
        {
            
        }

        public override void Cun()
        {
            Random ran = new Random();
            this.FGG = ran.Next(3) + 1;
            Qun qun = (Qun)FGG;
            Console.WriteLine("{0}:出拳：{1}", this.name, qun);
        }
    }
    class judge : Jse
    {
        public judge()
        {
        
        }
        public override void Cun()
        {
            
        }
    }



}
